/*
 *  Copyright (C) 2010 Glauco
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.common;

import java.io.Serializable;

/**
 * Search (pesquisa) de uma entidade. Possui uma representação visual que deve ser
 * composta por uma parte de filtros, por um grid para visuzalizar os atributos da
 * entidade e outra parte para as ações.
 * @author Glauco
 * @version 1.0
 * @created 11-mai-2010 18:55:57
 * @param <F> EntityFilter
 * @param <G> EntityGrid
 * @param <A> EntityActions
 * @param <V> Representação Visual da Busca.
 */
public interface Search
        <F extends EntityFilter, G extends EntityGrid,A extends EntityActions, V>
        extends VisualEntity<V> {

    /**
     * Atribui o EntityFilter.
     *
     * @param filter
     */
    public void setEntityFilter(F filter);

    /**
     * Retorna o EntityFilter.
     */
    public F getEntityFilter();

    /**
     * Atribui o EntityGrid.
     *
     * @param grid
     */
    public void setEntityGrid(G grid);

    /**
     * Retorna o EntityGrid.
     */
    public G getEntityGrid();

    /**
     * Atribui o EntityActions.
     *
     * @param actions
     */
    public void setEntityActions(A actions);

    /**
     * Retorna o EntityActions.
     */
    public A getEntityActions();

    /**
     * Retorna o EntityLoader da Busca.
     */
    public EntityLoader getEntityLoader();

    /**
     * Reinicial os parametros da Pesquisa para uma nova busca.
     */
    public void newSearch();

    /**
     * Retorna a entidade selecionada no EntityGrid.
     * @return Retorna a entidade selecionada no EntityGrid.
     */
    public Serializable getSelectedEntity();

}